package cn.teleus.common.tool;

import cn.teleus.common.TeleusConstants;

/**
 * Created by zhour on 2017/6/9.
 */
public class TeleDESUtil {

    public static String encrypt(String str) {
        try {
            return DES.encrypt(str,TeleusConstants.DES_SECURITY_KEY);
        } catch (Exception e) {
            e.printStackTrace();
            return null;
        }
    }

    public static String decode(String str){
        try {
            return DES.decrypt(str,TeleusConstants.DES_SECURITY_KEY);
        } catch (Exception e) {
            e.printStackTrace();
            return null;
        }
    }
}
